using System;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;

namespace jMVC.Utils
{
    /// <summary>
    /// Defines the contract for the MVCPanel's Model[] datastore
    /// </summary>
    public interface IPropertyBag
    {
        /// <summary>
        /// If you need to perform custom JSON serialization, you can register an object of type
        /// JsonConverter. This will be called to (de)serialize objects of its chosen type(s).
        /// </summary>
        void RegisterJsonConverter(JsonConverter converter);

        object this[string key] { get; set; }
        void Add(string key, object value);
        void Remove(string key);
        void Clear();
        IEnumerable<string> Keys { get; }
        bool ContainsKey(string key);
        int Count { get; }
    }
}
